<script>
export default {
	onLaunch: function () {
		console.log('App Launch');
		// #ifdef MP-WEIXIN
		if (uni.canIUse('getUpdateManager')) {
			const updateManager = uni.getUpdateManager();
			updateManager.onCheckForUpdate(function (res) {
				if (res.hasUpdate) {
					updateManager.onUpdateReady(function () {
						uni.showModal({
							title: '更新提示',
							content: '新版本已经准备好，是否重启应用？',
							success(res) {
								if (res.confirm) {
									// 新的版本已经下载好，调用 applyUpdate 应用新版本并重启
									updateManager.applyUpdate();
								}
							}
						});
					});
				}
			});
		}
		// #endif
	},
	onShow: function (options) {
		if(options.query.id){
			console.log('从别的小程序进入')
			uni.setStorageSync('tabtype', 2);
		}else{
			console.log('App Show');
		}
	},
	onHide: function () {
		console.log('App Hide');
	}
};
</script>

<style lang="scss">
/*每个页面公共css */
@import 'uview-ui/index.scss';
view,
scroll-view,
input {
	box-sizing: border-box;
}

::-webkit-scrollbar {
	display: none;
	width: 0 !important;
	height: 0 !important;
	-webkit-appearance: none;
	background: transparent;
	color: transparent;
}

/* 隐藏滚动条 */
/deep/.uni-scroll-view::-webkit-scrollbar {
	display: none;
}

page {
	background: #f2f2f2;
	font-size: 28rpx;
	width: 100%;
	height: 100%;
	overflow: auto;
}

// 按钮
.other-button {
	margin: 30rpx;
	background: #e2867e;
	border-radius: 45rpx;
	text-align: center;
	padding: 20rpx 0;
	color: #fff;
	font-size: 34rpx;
	margin-top: 120rpx;
}
.other-button-hover {
	opacity: 0.6;
}

// 图片
image {
	max-width: 100%;
	flex-shrink: 0;
}

/* // placeholder样式 */
.pcs {
	font-size: 28rpx;
	font-family: Source Han Sans CN;
	font-weight: 400;
	line-height: 40px;
	opacity: 1;
}

// 弹性布局
.uniFlex {
	display: flex;
	align-items: center;
}

.uniFlex2 {
	display: flex;
}

.uniBtn {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.uniBtn2 {
	display: flex;
	justify-content: space-between;
}

.uniCenter {
	display: flex;
	justify-content: center;
	align-items: center;
}
.uniEnd {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}
</style>
